Class MUConInMessage

All Implemented Interfaces:
LTV

public class MUConInMessage extends MultiUserMessage
This is a name update message from PT.
  • Field Details

    • linkId

      public int linkId
    • ascii

      public int ascii
    • special

      public int special
  • Constructor Details

    • MUConInMessage

      public MUConInMessage(int linkId, int ascii, int special)
      This function creates a new console input message for the MU protocol.
      Parameters:
      linkId - The ID of the input link
      ascii - The ascii value of the input character
      special - The special value code for the character
    • MUConInMessage

      public MUConInMessage()
  • Method Details

    • setLinkId

      public void setLinkId(int linkId)
      Sets the linkId
      Parameters:
      linkId - The linkId associated with the input
    • getLinkId

      public int getLinkId()
      Gets the linkId from the message
      Returns:
      The linkId contained in the message
    • setAscii

      public void setAscii(int ascii)
      Sets the ascii character for this input
      Parameters:
      ascii - The ascii character for the input
    • getAscii

      public int getAscii()
      Gets the ascii character from the message
      Returns:
      The ascii character for the input
    • setSpecial

      public void setSpecial(int special)
      Sets the special attributes
      Parameters:
      special - The special attributes for this character
    • getSpecial

      public int getSpecial()
      Gets the special attributes
      Returns:
      The special attributes for this character
    • getMessage

      public static MUConInMessage getMessage(EncodedBuffer buffer)
      A deserialization function that creates a new message from a PTBuffer object.
      Parameters:
      buffer - The PTBuffer to read from
      Returns:
      A new instance of a MUConInMessage class read from the buffer
    • encodeTypeAndPayload

      public void encodeTypeAndPayload(EncodedBuffer buffer)
      Serializes the message into a PTBuffer.
      Specified by:
      encodeTypeAndPayload in interface LTV
      Overrides:
      encodeTypeAndPayload in class LTVImpl
      Parameters:
      buffer - The PTBuffer to write the message into
    • toString

      public String toString()
      Converts this message into a string for debugging purposes
      Overrides:
      toString in class MultiUserMessage
      Returns:
      A string representation of this message